<?php
require_once("vcl/vcl.inc.php");
require_once("lib/db_connection.php");
//Includes
use_unit("forms.inc.php");
use_unit("extctrls.inc.php");
use_unit("stdctrls.inc.php");

//Class definition
class UpdateOOS extends Page
{
       public $hfreason = null;
       public $hfdate = null;
       public $hfveh = null;
       function UpdateOOSCreate($sender, $params)
       {
       $veh = $_GET['veh'];
       $date = $_GET['date'];
       $reason = $_GET['reason'];

       $this->hfveh->setValue($veh);
       $this->hfdate->setValue($date);
       $this->hfreason->setValue($reason);


       $result = mysql_query("insert into veh_decommission (company_id,
       veh_id,
       dec_date,
       reason)

       values ('".$_SESSION['company_id']."',
       '".$this->hfveh->getValue()."',
       '".$this->hfdate->getValue()."',
       '".$this->hfreason->getValue()."')")or die("INSERT VEHICLE DECOMMISSION - " . mysql_error());

       }

}

global $application;

global $UpdateOOS;

//Creates the form
$UpdateOOS=new UpdateOOS($application);

//Read from resource file
$UpdateOOS->loadResource(__FILE__);

//Shows the form
$UpdateOOS->show();

?>